package com.yanmaohu.yulia.bean;

import java.util.List;

/**
 * @author Bright Lee
 */
public final class TransactionCharacteristics {

    private int beginIndex;
    private int endIndex;
    private List<TransactionMode> transactionModeList;

    public TransactionCharacteristics(int beginIndex, List<TransactionMode> transactionModeList) {
        this.beginIndex = beginIndex;
        this.endIndex = transactionModeList.get(transactionModeList.size() - 1).getEndIndex();
        this.transactionModeList = transactionModeList;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public int size() {
        return transactionModeList.size();
    }

    public TransactionMode get(int index) {
        return transactionModeList.get(index);
    }

}
